package com.demo.project_template.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 订单
 * </p>
 *
 * @author 杨玉龙
 * @since 2024-08-21 15:46:07
 */
@Getter
@Setter
@TableName("t_order")
@ApiModel(value = "Order对象", description = "订单")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private Integer id;

    @ApiModelProperty("订单号")
    @TableField("order_no")
    private String orderNo;

    @ApiModelProperty("价格")
    @TableField("price")
    private BigDecimal price;

    @ApiModelProperty("用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "充值类型",notes = "1=充值金币，2=充值会员")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "充值目标的id",notes = "如果是充值金币则传金币充值配置id，如果是充值会员则传会员充值配置id")
    @TableField("target_id")
    private Integer targetId;

    @ApiModelProperty("数量")
    @TableField("count")
    private Integer count;

    @ApiModelProperty(value = "支付类型",notes = "1=微信支付，2=支付宝支付")
    @TableField("pay_type")
    private String payType;

    @ApiModelProperty(value = "状态",notes = "0=待支付，1=支付成功")
    @TableField("state")
    private String state;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;


}
